package com.common.util;


import android.util.Log;

public class MyLoger {


    //数值越小能看到的打印信息越多
    /**
     * Priority constant for the println method; use Log.v.
     */
    public static final int VERBOSE = 2;

    /**
     * Priority constant for the println method; use Log.d.
     */
    public static final int DEBUG = 3;

    /**
     * Priority constant for the println method; use Log.i.
     */
    public static final int INFO = 4;

    /**
     * Priority constant for the println method; use Log.w.
     */
    public static final int WARN = 5;

    /**
     * Priority constant for the println method; use Log.e.
     */
    public static final int ERROR = 6;


    private static int mLogLevel = VERBOSE;

    public static void setLogLevel(int level){

        mLogLevel = level;

    }


    public static void v(String var1, String var2){
        if(mLogLevel <= VERBOSE){
            Log.v(var1,var2);
        }
    }

    public static void d(String var1, String var2){
        if(mLogLevel <= DEBUG){
            Log.d(var1,var2);
        }
    }

    public static void i(String var1, String var2){
        if(mLogLevel <= INFO){
            Log.i(var1,var2);
        }
    }

    public static void w(String var1, String var2){
        if(mLogLevel <= WARN){
            Log.w(var1,var2);
        }
    }


    public static void e(String var1, String var2){
        if(mLogLevel <= ERROR){
            Log.e(var1,var2);
        }
    }

}
